global !p
def math():
	return vim.eval('vimtex#syntax#in_mathzone()') == '1'
endglobal

snippet -- "Commented line % ----------------- %" bA
% --------------------------------------------- %
endsnippet

snippet "([\W_])LL" "& (alignment character, which is a pain to reach)" rA
`!p snip.rv = match.group(1)`& 
endsnippet

snippet rule "horizontal rule" b
\rule{\textwidth}{0.5pt}
endsnippet

snippet hl "\hline with vertical spacing for tables" 
\hline {\rule{0pt}{2.5ex}} \hspace{-7pt}
endsnippet

snippet hff "\hfill" iA
\hfill 
endsnippet

snippet tbs "\textbackslash" iA
\textbackslash 
endsnippet

snippet ii "Item for enumerated environments \item" bA
\item 
endsnippet

snippet "(^|[^a-zA-Z0-9\\])q" "\quad" r
`!p snip.rv = match.group(1)`\quad 
endsnippet

snippet "(^|[^a-zA-Z0-9\\])qq" "\qquad" rA
`!p snip.rv = match.group(1)`\qquad 
endsnippet
